GM.Name = "Portal SP"
GM.Author = "Mahalis"
GM.Email = "mahalis@gmail.com"
GM.Base = "base"

local meta = FindMetaTable("Player")
if !meta then
	player.GetByID(1):PrintMessage(HUD_PRINTCENTER,"POOOOP")
	return
end

function meta:GetEyeTrace()
	if (self:GetTable().LastPlayerTrace == CurTime()) then
		return self:GetTable().PlayerTrace
	end

	self:GetTable().PlayerTrace = util.TraceLine(util.GetPlayerTrace(self,self:GetCursorAimVector()))
	self:GetTable().LastPlayerTrace = CurTime()
	
	return self:GetTable().PlayerTrace
end